<?php
$id=$_POST['id'];
$a=$_POST['zh'];
$b=$_POST['mm'];
$c=$_POST['nc'];
$d=$_POST['email'];
$e=$_POST['zt'];
$time=$_POST['ctime']=time();
var_dump($e);die;
@mysql_connect('localhost', 'root', 'root');
if (mysql_errno()) {
	die(mysql_errno());
}
mysql_select_db('blog');
mysql_set_charset('utf8');
$sql="update user set `zhanghao`='$a',`pwd`='$b',`nicheng`='$c',`email`='$d',`zhuangtai`='$e',`ctime`='$time' where id=$id ";

$res=mysql_query($sql);

if ($res) {
    echo "<script>alert('修改成功');window.location.href='user.php'</script>";
}
else{
    echo "<script>alert('修改失败');window.location.href='user.php'</script>";
}

mysql_close();

?>